/*本文件用来存放程序各种固定数据*/

/*棋盘背景色*/
var boardBackgroundColor = '#57faff';

//飞机四个方向的头边界
var xMargin = [[2,0,3,2],[7,6,9,7]];
var yMargin = [[0,2,2,3],[6,7,7,9]];

/*飞机机身各点坐标相对与机头坐标的增量*/
var dirInc = Array(4);
for (var i = 0; i < 4; i++) {
	dirInc[i] = Array(10);
	for (var j = 0; j < 10; j++) {
		dirInc[i][j] = Array(2);
	}
}
//机头向上
dirInc[0][0][0] =  0; dirInc[0][0][1] =  0;
dirInc[0][1][0] = -2; dirInc[0][1][1] =  1;
dirInc[0][2][0] = -1; dirInc[0][2][1] =  1;
dirInc[0][3][0] =  0; dirInc[0][3][1] =  1;
dirInc[0][4][0] =  1; dirInc[0][4][1] =  1;
dirInc[0][5][0] =  2; dirInc[0][5][1] =  1;
dirInc[0][6][0] =  0; dirInc[0][6][1] =  2;
dirInc[0][7][0] = -1; dirInc[0][7][1] =  3;
dirInc[0][8][0] =  0; dirInc[0][8][1] =  3;
dirInc[0][9][0] =  1; dirInc[0][9][1] =  3;
//机头向左
dirInc[1][0][0] =  0; dirInc[1][0][1] =  0;
dirInc[1][1][0] =  1; dirInc[1][1][1] =  2;
dirInc[1][2][0] =  1; dirInc[1][2][1] =  1;
dirInc[1][3][0] =  1; dirInc[1][3][1] =  0;
dirInc[1][4][0] =  1; dirInc[1][4][1] = -1;
dirInc[1][5][0] =  1; dirInc[1][5][1] = -2;
dirInc[1][6][0] =  2; dirInc[1][6][1] =  0;
dirInc[1][7][0] =  3; dirInc[1][7][1] =  1;
dirInc[1][8][0] =  3; dirInc[1][8][1] =  0;
dirInc[1][9][0] =  3; dirInc[1][9][1] = -1;
//机头向右
dirInc[2][0][0] =  0; dirInc[2][0][1] =  0;
dirInc[2][1][0] = -1; dirInc[2][1][1] = -2;
dirInc[2][2][0] = -1; dirInc[2][2][1] = -1;
dirInc[2][3][0] = -1; dirInc[2][3][1] =  0;
dirInc[2][4][0] = -1; dirInc[2][4][1] =  1;
dirInc[2][5][0] = -1; dirInc[2][5][1] =  2;
dirInc[2][6][0] = -2; dirInc[2][6][1] =  0;
dirInc[2][7][0] = -3; dirInc[2][7][1] = -1;
dirInc[2][8][0] = -3; dirInc[2][8][1] =  0;
dirInc[2][9][0] = -3; dirInc[2][9][1] =  1;
//机头向下
dirInc[3][0][0] =  0; dirInc[3][0][1] =  0;
dirInc[3][1][0] =  2; dirInc[3][1][1] = -1;
dirInc[3][2][0] =  1; dirInc[3][2][1] = -1;
dirInc[3][3][0] =  0; dirInc[3][3][1] = -1;
dirInc[3][4][0] = -1; dirInc[3][4][1] = -1;
dirInc[3][5][0] = -2; dirInc[3][5][1] = -1;
dirInc[3][6][0] =  0; dirInc[3][6][1] = -2;
dirInc[3][7][0] =  1; dirInc[3][7][1] = -3;
dirInc[3][8][0] =  0; dirInc[3][8][1] = -3;
dirInc[3][9][0] = -1; dirInc[3][9][1] = -3;

/*飞机样式数组*/
var flightStyle = Array(4);
for (var i = 0; i < 4; i++) {
	flightStyle[i] = Array(10);
}
//飞机向上
flightStyle[0][0] = 'solid solid none solid';
flightStyle[0][1] = 'solid none solid solid';
flightStyle[0][2] = 'solid none solid none';
flightStyle[0][3] = 'none none none none';
flightStyle[0][4] = 'solid none solid none';
flightStyle[0][5] = 'solid solid solid none';
flightStyle[0][6] = 'none solid none solid';
flightStyle[0][7] = 'solid none solid solid';
flightStyle[0][8] = 'none none solid none';
flightStyle[0][9] = 'solid solid solid none';
//飞机向左
flightStyle[1][0] = 'solid none solid solid';
flightStyle[1][1] = 'none solid solid solid';
flightStyle[1][2] = 'none solid none solid';
flightStyle[1][3] = 'none none none none';
flightStyle[1][4] = 'none solid none solid';
flightStyle[1][5] = 'solid solid none solid';
flightStyle[1][6] = 'solid none solid none';
flightStyle[1][7] = 'none solid solid solid';
flightStyle[1][8] = 'none solid none none';
flightStyle[1][9] = 'solid solid none solid';
//飞机向右
flightStyle[2][0] = 'solid solid solid none';
flightStyle[2][1] = 'solid solid none solid';
flightStyle[2][2] = 'none solid none solid';
flightStyle[2][3] = 'none none none none';
flightStyle[2][4] = 'none solid none solid';
flightStyle[2][5] = 'none solid solid solid';
flightStyle[2][6] = 'solid none solid none';
flightStyle[2][7] = 'solid solid none solid';
flightStyle[2][8] = 'none none none solid';
flightStyle[2][9] = 'none solid solid solid';
//飞机向下
flightStyle[3][0] = 'none solid solid solid';
flightStyle[3][1] = 'solid solid solid none';
flightStyle[3][2] = 'solid none solid none';
flightStyle[3][3] = 'none none none none';
flightStyle[3][4] = 'solid none solid none';
flightStyle[3][5] = 'solid none solid solid';
flightStyle[3][6] = 'none solid none solid';
flightStyle[3][7] = 'solid solid solid none';
flightStyle[3][8] = 'solid none none none';
flightStyle[3][9] = 'solid none solid solid';